package app.vendorportal.api.marketplace.data;

import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author carl.you
 */
@XmlRootElement(name = "pick-ticket")
@XmlAccessorType(XmlAccessType.FIELD)
public class PickTicket {

    @XmlElement(name = "number-of-line-item")
    private String numberOfLineItem;

    @NotNull(message = "pick ticket number is required")
    @XmlElement(name = "pick-ticket-number")
    private String pickTicketNumber;

    @NotNull(message = "order id is required")
    @XmlElement(name = "order-id")
    private String orderId;

    @XmlElement(name = "order-date")
    private Date orderDate;

    @XmlElement(name = "estimated-ship-date")
    private Date estimatedShipDate;

    @NotNull(message = "name and address information is required")
    @XmlElementWrapper(name = "name-and-address-info-list")
    @XmlElement(name = "pick-ticket-shipping-info")
    private final List<PickTicketShippingInfo> nameAndAddressInfo = new ArrayList<>();

    @NotNull(message = "pick ticket items is required")
    @XmlElementWrapper(name = "pick-ticket-item-list")
    @XmlElement(name = "pick-ticket-item")
    private final List<PickTicketItem> pickTicketItem = new ArrayList<>();


    public String getNumberOfLineItem() {
        return numberOfLineItem;
    }

    public void setNumberOfLineItem(String numberOfLineItem) {
        this.numberOfLineItem = numberOfLineItem;
    }

    public String getPickTicketNumber() {
        return pickTicketNumber;
    }

    public void setPickTicketNumber(String pickTicketNumber) {
        this.pickTicketNumber = pickTicketNumber;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public Date getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    public Date getEstimatedShipDate() {
        return estimatedShipDate;
    }

    public void setEstimatedShipDate(Date estimatedShipDate) {
        this.estimatedShipDate = estimatedShipDate;
    }

    public List<PickTicketShippingInfo> getNameAndAddressInfo() {
        return nameAndAddressInfo;
    }

    public List<PickTicketItem> getPickTicketItem() {
        return pickTicketItem;
    }

}
